package thread.simulation;

/**
 * Title：
 * Description：
 * Created by Myth on 4/18/2017.
 */
public class MyNumber {
    private int number = -1;

    public MyNumber() {
        this.number = number;
    }
    public MyNumber(int number) {
        this.number = number;
    }

    public int getNumber() {
        return number;
    }

    public void setNumber(int number) {
        this.number = number;
    }


    @Override
    public boolean equals(Object obj) {
        if (!(obj instanceof MyNumber)) return false;
        return ((MyNumber)obj).getNumber()==this.number;
    }

    @Override
    public String toString() {
        return  "number=" + number;
    }
}
